package com.np.shop.utils;

/**
 * {
 *   "code": 0,
 *   "flag": true,
 *   "message": "string",
 *   "data": [
 *     {
 *       "id": "string",
 *       "title": "string",
 *       "content": "string",
 *       "createtime": "string",
 *       "updatetime": "string",
 *       "userid": "string",
 *       "nickname": "string",
 *       "visits": "string",
 *       "thumbup": "string",
 *       "reply": "string",
 *       "solve": "string",
 *       "replyname": "string",
 *       "replytime": "string"
 *     }
 *   ]
 * }
 */

/**
 * 统一返回实体类
 */
public class Result {
    private int code; //状态码
    private boolean flag; //是否成功
    private String message; //提示信息
    private Object data; //返回数据

    public Result(int code, boolean flag, String message, Object data) {
        this.code = code;
        this.flag = flag;
        this.message = message;
        this.data = data;
    }

    public Result() {
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public boolean isFlag() {
        return flag;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
